const baseURL = "https://api-hmugo-web.itheima.net/api/public/v1/"
export const http = ({url,data,header,method})=>{
    return new Promise((resolve,reject)=>{
        uni.showNavigationBarLoading()
        uni.request({
            url:baseURL+ url, 
            data,
            header,
            method,
            success: (res) => {                
               resolve(res)
               uni.hideNavigationBarLoading()
            }
        });
    })
}
